package com.example.mobile2032021606170hsy0521;

import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.PluralsRes;
import androidx.recyclerview.widget.RecyclerView;

import java.util.List;

public class NewsRVAdapter extends  RecyclerView.Adapter<NewsRVAdapter.ViewHolder>{
    private List<News>newsList;
    public  NewsRVAdapter(List<News> newsList){
        this.newsList = newsList;
    }
    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return null;
    }

    @Override
    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return newsList.size();
    }

    static class ViewHolder extends RecyclerView.ViewHolder{
        TextView tvItenID,tvItemTitle;
        public ViewHolder(@NonNull View itemView) {
            super(itemView);
            tvItenID = itemView.findViewById(R.id.tvItemID);
            tvItemTitle = itemView.findViewById(R.id.tvItemTitle);
        }
    }
}
